/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/<a href="https://www.kaaction.com">KAA</a>"><a href="https://www.kaaction.com">KAA</a></a> All rights reserved.
 */
package com.kaaction.modules.ka.entity;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;

import com.kaaction.common.persistence.DataEntity;

/**
 * 物料明细管理Entity
 * @author huanghaiming
 * @version 2017-04-26
 */
public class MaterialDetails extends DataEntity<MaterialDetails> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 物料名称
	private Integer amount;		// 数量
	
	private String[] ids;
	
	public MaterialDetails() {
		super();
	}

	public MaterialDetails(String id){
		super(id);
	}

	@Length(min=1, max=32, message="物料名称长度必须介于 1 和 32 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@NotNull(message="数量不能为空")
	public Integer getAmount() {
		return amount;
	}

	public void setAmount(Integer amount) {
		this.amount = amount;
	}

	public String[] getIds() {
		return ids;
	}

	public void setIds(String[] ids) {
		this.ids = ids;
	}
	
	
}